<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
	<head>
		<base href="<%=basePath%>">
		<!-- jsp文件头和头部 -->
		<%@ include file="../../system/admin/top.jsp"%>
		<meta charset="utf-8" />
		<title></title>
		<script type="text/javascript" src="static/js/bootstrap-datetimepicker.js"></script>
<script type="text/javascript">
	//保存
	function save(){
		if ($("personNum").val()== "") {
			$("#personNum").tips({
				side : 3,
				msg : '请准确填写领取人工号',
				bg : '#AE81FF',
				time : 2
			});
			$("#personNum").focus();
			return false;
		}
		$.ajax({
			type: "POST",
			url: $("#Form").attr("action"),
	    	data: $("#Form").serialize(),
			dataType:'json',
			cache: false,
			success: function(data){
				if(data.status){
					document.getElementById('zhongxin').style.display = 'none';
					top.Dialog.close();
				}else{
					bootbox.confirm(data.msg, function(result) {
					})
				}

			}
		})
		
		/* $("#Form").submit();
		$("#zhongxin").hide();
		$("#zhongxin2").show(); */
	}

	
	
</script>
	</head>
<body>
	<form action="applygetmaterials/${msg }.do" name="Form" id="Form" method="post">
		<input type="hidden" name="apply_get_materials_id" id="apply_get_materials_id" value="${pd.apply_get_materials_id}"/>
		<div id="zhongxin">
		<table id="table_report" class="table table-striped table-bordered table-hover">
			<tr>
					<td style="width: 70px; text-align: right; padding-top: 13px;">发放方式:</td>
					<td>
						<input type="text" name="inform_text"
						id="inform_text"  placeholder="这里输入" title="" 
						<c:if test="${pd.inform_get_type==0}">
							value="公司领取"
						</c:if>
						<c:if test="${inform_get_type==1}">
							value="快递邮寄"
						</c:if>
						readonly="readonly"/>
					</td>
				</tr>
				<tr>
					<td style="width: 70px; text-align: right; padding-top: 13px;">领取时间:</td>
					<td><input type="text" name="inform_get_time"
						id="inform_get_time" value="${pd.inform_get_time}" readonly="readonly"/></td>
				</tr>
				<tr>
					<td style="width: 70px; text-align: right; padding-top: 13px;">详细说明:</td>
					<td><input type="text" name="inform_text"
						id="inform_text" value="${pd.inform_text}" readonly="readonly"/></td>
				</tr>
				<tr>
					<td style="width: 70px; text-align: right; padding-top: 13px;">附件:</td>
					<td>无</td>
				</tr>
				<tr>
					<td style="width: 70px; text-align: right; padding-top: 13px;">领取人工号:</td>
					<td><input type="text" name="personNum"
						id="personNum" placeholder="这里输入" title=""/>
					</td>
				</tr>
			<tr>
				<td style="text-align: center;" colspan="10">
					<a class="btn btn-mini btn-primary" onclick="save();">保存</a>
					<a class="btn btn-mini btn-danger" onclick="top.Dialog.close();">取消</a>
				</td>
			</tr>
		</table>
		</div>
		
		<div id="zhongxin2" class="center" style="display:none"><br/><br/><br/><br/><br/><img src="static/images/jiazai.gif" /><br/><h4 class="lighter block green">提交中...</h4></div>
		
	</form>
	
	
		<!-- 引入 -->
		<script type="text/javascript">window.jQuery || document.write("<script src='static/js/jquery-1.9.1.min.js'>\x3C/script>");</script>
		<script src="static/js/bootstrap.min.js"></script>
		<script src="static/js/ace-elements.min.js"></script>
		<script src="static/js/ace.min.js"></script>
		<script type="text/javascript" src="static/js/bootbox.min.js"></script><!-- 确认窗口 -->
		<script type="text/javascript" src="static/js/chosen.jquery.min.js"></script><!-- 下拉框 -->
		<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script><!-- 日期框 -->
		<script type="text/javascript">
		$(top.hangge());
		$(function() {
			
			//单选框
			$(".chzn-select").chosen(); 
			$(".chzn-select-deselect").chosen({allow_single_deselect:true}); 
			
			//日期框
			$(".form_datetime").datetimepicker( {
                autoclose:true,
                format: "yyyy-mm-dd hh:ii",
                language: 'cn',
                clearBtn:true,
                todayHighlight: true
            });
			
		});
		
		</script>
</body>
</html>